package clientService;

import common.Message;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author lhn
 * @date 2024-05-03 13:03
 */

public class ManageClientConnectServerThread {
    //把多个线程放入一个HashMap集合，key为用户id，value为线程
    private static HashMap<String, ClientConnectServerThread> hashMap = new HashMap<>();

    //将线程加入集合
    public static void addClientConnectServerThread(String uid, ClientConnectServerThread clientConnectServerThread) {
        hashMap.put(uid, clientConnectServerThread);
    }

    //取出线程
    public static ClientConnectServerThread getClientConnectServerThread(String uid) {
        return hashMap.get(uid);
    }
}
